<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>登录</title>
	<link rel="stylesheet" type="text/css" href="resource/css/login.css" />
	<script language="javascript" type="text/javascript" src="js/lib/jquery-1.10.2.js"></script>
</head>
<body>
	<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:120px">
	  <tr>
		<td style="width:450px;" height="259" align="center" valign="bottom" background="resource/images/login_1.gif">
			<table width="90%" border="0" cellspacing="3" cellpadding="0">
			  <tr>
				<td align="right" valign="bottom" style="color:#05B8E4">
					Powered by <a href="http://www.whyun.com" target="_blank">xxx</a> Copyright 2014-
				</td>
			  </tr>
			</table>
		</td>
		<td width="195" background="resource/images/login_2.gif">
		
		<form name="form1" id="loginForm" method="post" action="back/login_safe.php">		
			<table width="190" style="width:190px;" height="106" border="0" align="center" cellpadding="2" cellspacing="0">    
				<tr>
				  <td height="50" colspan="2" align="left">&nbsp;</td>
				</tr>
				<tr>
				  <td width="60" height="30" align="left">登陆名称</td>
				  <td>
				  	<input name="username" id="username" type="text" class="loginInput" size="14" />
				  </td>
				</tr>
				<tr>
				  <td height="30" align="left">登陆密码</td>
				  <td>
				  	<input type="password" name="passwd" id="passwd" class="loginInput" size="16" />
				  </td>
				</tr>
				
				<tr>
				  <td height="40" colspan="2" align="center">欢迎访问</td>
				</tr>
				<tr>
				  <td colspan="2" align="center">
					  <input type="submit" name="subLogin" id="subLogin" class="loginButton" value=" 登  陆 "  /> 
					  <input type="reset" name="reset" class="loginButton" value=" 重  填 " />
				  </td>
				<tr>
				<tr>
				  <td height="5" colspan="2"></td>
				</tr>        
			</table>
			
		</form>
		
		</td>
		<td width="133" background="resource/images/login_3.gif">&nbsp;</td>
	  </tr>
	  <tr>
		<td height="161" colspan="3" valign="middle" background="resource/images/login_4.gif">
			<div id="loginWatting" style="display:none;"></div>
		</td>
	  </tr>
	</table>
	<script type="text/javascript">
		$(document).ready(function() {
			$('#loginForm').submit(function() {
				$.post($(this).attr('action'),$(this).serialize(),function( data ){
					console.log(data);
                    if( data.code == 0){
                        location.href='back/main.php';
                    } else {
                        alert(data.msg);
                    }
                },'json');
				return false;
			});
		});
	</script>
</body>
</html>